package com.wg.msshopsp.backendmanagement.order.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wg.msshopsp.backendmanagement.order.entity.OrderVO;
import com.wg.msshopsp.backendmanagement.order.mapper.OrderVOMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderVOService extends ServiceImpl<OrderVOMapper,OrderVO> {
    @Autowired
    private OrderVOMapper orderVOMapper;
    public List<OrderVO> selectBySellerId(Long sellerId) {
        return orderVOMapper.selectBySellerId(sellerId);
    }

    public int updateOrderStatus(Long orderId, Integer newStatus, Long sellerId) {
        return orderVOMapper.updateOrderStatus(orderId, newStatus, sellerId);
    }


    public int deleteOrder(Long orderId, Long sellerId) {
        return orderVOMapper.deleteOrder(orderId, sellerId);
    }
}
